import React from 'react';
import { Select } from 'antd';
import { useTranslation } from 'react-i18next';

export default function OrderStateSelector(props: { onChange: (x: string) => void }) {
	const {t} = useTranslation();

	return (
		<Select defaultValue={'any'} onChange={props.onChange}>
			<Select.Option value={'any'}>{t('option-order-any')}</Select.Option>
			<Select.Option value={'open'}>{t('option-order-open')}</Select.Option>
			<Select.Option value={'closed'}>{t('option-order-closed')}</Select.Option>
			<Select.Option value={'error'}>{t('option-order-error')}</Select.Option>
		</Select>
	);
}
